
SOURCES += AudioStorage.cpp
SOURCES += Base64.cpp
SOURCES += ConfigImpl.cpp
SOURCES += ConfigImpl.libxml.cpp
SOURCES += Index.cpp
SOURCES += Input.cpp
SOURCES += Tasks.cpp
SOURCES += VoiceRecoEngine.cpp
SOURCES += VoiceRecoSession.cpp


#############################################################################
# Don't modify following lines unless you know what you are doing

SDK_DIR = ../import/nebula/SDK

TARGET = libsmartvoice.so
OBJECTS = $(SOURCES:.cpp=.o)

INCLUDES += -I$(SDK_DIR)
INCLUDES += -I../3rd_party/libxml/include/libxml2
INCLUDES += -I../3rd_party/voicecloud/include

CPPFLAGS = -g

LIBS += $(SDK_DIR)/libnebulasdk.a

LDFLAGS += -L../3rd_party/libxml/lib
LDFLAGS += -L../3rd_party/voicecloud/lib
LDFLAGS += -lmsc
LDFLAGS += -lxml2
LDFLAGS += -lpthread
LDFLAGS += -lstdc++
LDFLAGS += -lutil
LDFLAGS += -luuid

all: $(TARGET)

clean:
	-rm -f $(TARGET) $(OBJECTS)

check: all

.cpp.o:
	g++ -c $(INCLUDES) $(CPPFLAGS) -o $@ $^

$(TARGET): $(OBJECTS)
	g++ -shared -o $@ $(LDFLAGS) -Wl,--whole-archive $(LIBS) -Wl,--no-whole-archive $^

